home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6161 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: newshost.cyberramp.net!news
  2. From: sinan@cyberramp.net (John Noland)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Why I can not bind
  5. Date: 23 Feb 1996 00:08:40 GMT
  6. Organization: Prose Software
  7. Message-ID: <4gj0i8$8u6@newshost.cyberramp.net>
  8. References: <312B86AF.165F@cis.ohio-state.edu>
  9. NNTP-Posting-Host: ramp3-1.cyberramp.net
  10. X-Newsreader: WinVN 0.99.5
  11.  
  12. In article <312B86AF.165F@cis.ohio-state.edu>, jun@cis.ohio-state.edu says...
  13. >
  14.  
  15. I apologize in advance for not being very helpful with this problem. I
  16. just wanted to point out a few things which you may or may not find 
  17. useful in obtaining an answer to your query.
  18.  
  19. > I encounter the run time error of "Unable to bind". 
  20. > printf("Unable to bind");
  21.  
  22. It's a little misleading to characterize the output of the above
  23. printf() as a run time error.
  24.  
  25. >
  26. >#include <stdio.h>
  27. >#include <sys/types.h>
  28. >#include <sys/socket.h>
  29. >#include <netinet/in.h>
  30. >#include <arpa/inet.h>
  31. >
  32.  
  33. I only *know* the contents of one of the above header files. Guess which one!
  34.  
  35. >  if (bind(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) <
  36.  
  37. Where's the code for this function?
  38.  
  39. You would probably have a lot better chance of receiving help in the
  40. comp.os.unix.programmer group. This group seems to be fairly dedicated
  41. to non-platform specific issues dealing with the C *language* itself and
  42. not with programming problems where a person just happens to be using
  43. C. 
  44.  
  45. Good luck
  46.  
  47. - John
  48.  
  49.